package object;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

/**
 * @TODO   2.距离当前时间500天后的日期和时间、星期
 * @Author xu
 * 2025/3/10
 */
  import java.time.LocalDateTime;
  import java.time.format.DateTimeFormatter;

public class Date02 {
    public static void main(String[] args) {
        LocalDateTime currentDateTime = LocalDateTime.now();
        LocalDateTime futureDateTime = currentDateTime.plusDays(500);

        DateTimeFormatter dateFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
        DateTimeFormatter timeFormatter = DateTimeFormatter.ofPattern("HH:mm:ss");
        String dayOfWeek = futureDateTime.getDayOfWeek().toString();

        System.out.println("距离当前时间 500 天后的日期: " + futureDateTime.format(dateFormatter));
        System.out.println("时间: " + futureDateTime.format(timeFormatter));
        System.out.println("星期: " + dayOfWeek);
    }
}
